/**
 *
 * @param sequelize
 * @param DataTypes
 * @returns {*|{}|Model}
 */

var sequelize = require('../sequelize.js');
var Sequelize = require('sequelize');
var DataTypes = Sequelize;

var Model = sequelize.define('mh_ticket_checkout',
  {
    id: {type: DataTypes.INTEGER(11), allowNull: false, primaryKey: true, autoIncrement: true},
    vid: {type: DataTypes.INTEGER(11), allowNull: false},
    begin: {type: DataTypes.INTEGER(11), allowNull: false},
    end: {type: DataTypes.INTEGER(11), allowNull: false},
    origin_money: {type: DataTypes.FLOAT, allowNull: false},
    commission: {type: DataTypes.FLOAT, allowNull: false, defaultValue: '0'},
    trans_money: {type: DataTypes.FLOAT, allowNull: false},
    status: {type: DataTypes.INTEGER(6), allowNull: false, defaultValue: '0'},
    createdAt: {type: DataTypes.DATE},
    updatedAt: {type: DataTypes.DATE}
  },
  {
    tableName: 'mh_checkout',
    freezeTableName: true
  });
module.exports = Model;
